package com.itheima.stock.face;

import com.itheima.stock.common.domian.UserAddDomain;
import com.itheima.stock.pojo.SysPermission;
import com.itheima.stock.pojo.SysUser;

import java.util.List;

/**
 * @author: siwukun
 * @date: 2022/06/16
 * @description:
 */
public interface UserRolePermissionService {

    /**
     * 缓存登录用户对应的权限和角色
     * @param uid
     * @return
     */
    List<String> getUserRoleAndPermissionInfo(String uid);


    /**
     * 用cache获取用户对应的权限
     * @param sysUser
     * @param permissions
     */
    void getMenus(SysUser sysUser, List<SysPermission> permissions);

    /**
     * 修改用户同时把用户信息缓存清除
     * @param userAddDomain
     */
    boolean cleanUserCacheinfo(UserAddDomain userAddDomain);
}
